themes: Fix swapped borders on RTL PathBar buttons
authorDaniel Boles <dboles.src@gmail.com>
Sun, 22 Apr 2018 20:45:18 +0000 (21:45 +0100)
committerDaniel Boles <dboles.src@gmail.com>
Sun, 22 Apr 2018 21:06:50 +0000 (22:06 +0100)
commitb92e6881413609f5e315f234df70789b60c11ad1
treebc27eec832a06209bbb91e9ff18ac781b414442b
parent0401e031ada0e36226e50d2105f8dcd51220bb48
themes: Fix swapped borders on RTL PathBar buttons

.linked assumes the container is a GtkBox, which is documented as never
flipping children in RTL, so :first-child is always the left child, etc.
GtkBox does that by reordering its CSS nodes when the direction changes.

But most widgets don’t do that, so :first|last-child are 1st/last ADDED
and swap sides in RTL. GtkPathBar is so, and ignoring that in our themes
meant that in RTL, its left/right buttons got each other’s borders. Yuk!

This patch adds the groundwork for supporting widgets like that, via the
%linked_flippable placeholder, and applies that to override buttons in
  filechooser .path-bar.linked > button
so that the correct borders get applied to those buttons when using RTL.

Note that I select only PathBars within a FileChooser because we also
have NautilusPathBar, which also uses widget.path-bar – but *does* flip
its nodes for RTL already, so letting that get affected broke it again!

https://bugzilla.gnome.org/show_bug.cgi?id=772817
gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css
gtk/theme/HighContrast/_common.scss
gtk/theme/HighContrast/gtk-contained-inverse.css
gtk/theme/HighContrast/gtk-contained.css